package io.bdmc.modules.bss.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 单盘数据表 实体
 * </p>
 *
 * @author 黄露
 * @since 2021-04-28
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
// "DeviceMachineDisk对象", description = "单盘数据表")
public class DeviceMachineDisk extends Model<DeviceMachineDisk> {

  private static final long serialVersionUID = 1L;

  // "单盘数据表id")
  @TableId(value = "machine_disk_id", type = IdType.AUTO)
  private Integer machineDiskId;

  // "子机框数据id")
  private Integer machineRackId;

  // "机盘的端口号（盘地址）,编号从1始到SlotNumber")
  private Integer slotPort;

  // "rackSn")
  private String rackSn;

  // "sn")
  private String diskSn;

  // "数据有效性")
  private String dataValidity;

  // "固件内部版本")
  private String slotSversion;

  // "硬件版本")
  private String slotHversion;

  // "协议版本")
  private String protocolVersion;

  // "单板可以插到总模块个数")
  private Integer moduleNum;

  // "表示单盘上面的在位模块个数")
  private Integer moduleCount;

  // "模块的数据段")
  private String moduleData;

  // "温度")
  private String temper;

  // "普通一个槽位单盘默认值为0x01")
  private String slotHw;

  // "单盘位置信息")
  private String location;

  // "创建时间")
  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
  private LocalDateTime createTime;

  // "更新时间")
  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
  private LocalDateTime updateTime;

  @Override
  public Serializable pkVal() {
    return this.machineDiskId;
  }

}
